There is no brute-force solutions
We're used to evaluating an algorithm's Time complexity, but we often overlook its Space complexity. However, often the best solution for Time complexity is a brute-force solution for Space complexity and vice versa.
Read more